﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Text1();
        }
        public static void Text()
        {
            int[] arr = { 64, 12, 47, 338 };
            int sum = 0;
            int max = arr[0];
            int min = arr[0];
            double avg = arr[0];

            //ref
            RefOut c = new RefOut();
            c.Ru(arr, ref sum, ref max, ref min, ref avg);
            Console.WriteLine("sum: {0} max: {1} min: {2} avg: {3}", sum, max, min, avg);

            //out
            RefOut b = new RefOut();
            b.Ru1(arr, out sum, out max, out min, out avg);
            Console.WriteLine("sum: {0} max: {1} min: {2} avg: {3}", sum, max, min, avg);

        }
        public static void Text1()
        {
            Teacher t = new Teacher();
            t.NameA = "孙悟空";
            t.NameB = "猪八戒";
            t.NameC = "沙悟净";
            t.NameD = "白龙马";
            t.Test();
        }
        
    }
}
